<?php
/**
 * User: Marko Ambrožič
 * Date: 13.12.2014
 * Time: 18:28
 */

class Zend_View_Helper_Seller {
    // Init data for AdminEdit form
    public function seller() {

    }

    public function getStranke($where = null) {
        $mapper = new Application_Model_StrankaMapper();
        return $mapper->getAllStranke($where);
    }

    public function getNarocila($where = null) {
        $result = array();
        $mapper = new Application_Model_NarociloMapper();
        $narocila = $mapper->fetchAll($where);

        foreach ($narocila as $narocilo) {
            $n = new Application_Model_Narocilo();
            $n->loadById($narocilo['idnarocilo']);
            $result[$narocilo['idnarocilo']] = $n;
        }

        return $result;
    }

}